<%--
  Created by IntelliJ IDEA.
  User: jz
  Date: 2022/3/25
  Time: 18:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>订单详情</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/order_detail.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/image/smallLogo.svg" type="image/x-icon">
    <script src="${pageContext.request.contextPath}/js/jquery-3.6.0.min.js"></script>
    <script src="${pageContext.request.contextPath}/layui/layui.js"></script>

    <style>

        <%--        悬浮在a标签上会出现的效果--%>
        .cus_title .logo .title_list li a:hover + span {
            background-image: url("${pageContext.request.contextPath}/image/list_buttom.png");
            background-size: 12px 6px;
        }

        /*给a标签上色*/
        .cus_title .logo .title_list li .current_page {
            color: #23b7b7 !important;
        }

        /*给span标签加三角形*/
        .cus_title .logo .title_list li .current_page_bottom {
            background-image: url("${pageContext.request.contextPath}/image/list_buttom.png");
            background-size: 12px 6px;
        }

    </style>
</head>
<body>

<jsp:include page="../common/head.jsp"/>
<div class="cus_body">
    <div class="left_info">
        <ul class="left_info_ul">
            <li class="left_title">
                <span>我的神行</span>
            </li>
            <li class="left_body">
                <a href="${pageContext.request.contextPath}/customer/customer_info.jsp">用户信息</a>
            </li>
<%--            <li class="left_body">--%>
<%--                <a href="">我的收藏</a>--%>
<%--            </li>--%>
            <li class="left_body">
                <a href="${pageContext.request.contextPath}/ordermanage" class="click_style">订单管理</a>
            </li>
            <li class="left_body">
                <a href="${pageContext.request.contextPath}/customer/coupon/${customer.memberId}">我的优惠券</a>
            </li>
            <li class="left_body">
                <a href="">我的消息</a>
            </li>
        </ul>
    </div>
</div>
<div class="order_info">
    <!--===========================================订单状态栏============================================-->

    <div class="order-status status-gray">
        <h2><c:if test="${orderdetail.myorderStatus==0}">
            未支付
        </c:if>
            <c:if test="${orderdetail.myorderStatus==1}">
                已支付
            </c:if>
            <c:if test="${orderdetail.myorderStatus==2}">
                取消支付
            </c:if>
        </h2>
        <div class="dashed-border"></div>
        <p><span>订单号:</span> <span>${orderdetail.myorderNumber}</span>
            <span>|</span><span>租车人:</span><span>${memberdetail.memberName}</span><span>|</span>
            <span>支付状态:</span>
            <c:if test="${orderdetail.myorderStatus==0}">
                <span>未支付</span>

            </c:if>
            <c:if test="${orderdetail.myorderStatus==1}">
                <span>已支付</span>
            </c:if>
            <c:if test="${orderdetail.myorderStatus==1}">
                <c:if test="${review==null}">
                <span>|</span> <span class="review_go"><a  style="color: #23b7b7" href="${pageContext.request.contextPath}/goReview/${orderdetail.myorderNumber}">去评价</a></span>
                </c:if>
            </c:if>
            </p>
    </div>

    <!--=================================================订单详情信息============================================-->
    <div class="car-image-box">
        <img src="${pageContext.request.contextPath}/image/create_order_car.png" alt="">
        <div class="rent-date">
            <span>租 期: <span class="day-span">${orderdetail.carDay}</span>天</span>
        </div>
    </div>
    <!--           -----------------  --------   订单店铺信息-->
    <div class="order-detil-info">
        <div class="store-info-box">
            <div class="car-name">
                <p class="revise-back" href="">${cardetail.carBrand}${cardetail.carName}</p>
                <a class="car-info" href="${pageContext.request.contextPath}/car/${orderdetail.carId}">车辆详情</a>
            </div>
            <ul class="info">
                <%--                <li>--%>
                <%--                    <span>取车地点</span>--%>
                <%--                    <span>还车地点</span>--%>
                <%--                </li>--%>
                <li>
                    <span>取车门店: ${getShopDetail.data.shopName}</span>
                    <span>还车门店: ${returnShopDetail.data.shopName}</span>
                </li>
                <li>
                    <span>取车时间: <fmt:formatDate value="${orderdetail.getCarDate}" pattern="yyyy-MM-dd HH:mm"/></span>
                    <span>还车时间: <fmt:formatDate value="${orderdetail.backCarDate}"
                                                pattern="yyyy-MM-dd HH:mm"/></span>
                </li>
                <li>
                    <span>取车地址: ${getShopDetail.data.shopAddress}</span>
                    <span>还车地址: ${returnShopDetail.data.shopAddress}</span>
                </li>
            </ul>
        </div>
    </div>


    <!--==============================================费用明细=============================-->
    <div class="mod price-info">
        <h2 class="hd">费用明细</h2>
        <div class="order-detial-price">
            <h3>
                车辆租赁费<span>(原价:</span><span>${orderdetail.myorderRawprice}</span><span>元</span><span>, 折扣优惠:</span><span>${ownCoupon.ownCouponPrice}</span><span>元)</span>
            </h3>
            <p>￥<span>${orderdetail.myorderTotalPrice}</span></p>
            <div class="dashed-border db-gray-normal "></div>
        </div>

        <div class="order-detial-price">
            <h3>优惠折扣</h3>
            <c:if test="${!empty ownCoupon.ownCouponPrice}">
                <p>￥<span>- ${ownCoupon.ownCouponPrice}</span></p>
            </c:if>
            <c:if test="${empty ownCoupon.ownCouponPrice}">
                <p>￥<span>- 0</span></p>
            </c:if>

            <div class="dashed-border db-gray-normal "></div>
        </div>

        <div class="count-price">
            <p>总计: <span>￥</span><span>${orderdetail.myorderTotalPrice}</span></p>

        </div>
    </div>
</div>

</body>
</html>
